﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading.Tasks;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
    public class ForOffer
    {
        public SqlDataReader SeeBook(int bookId)
        {
            //编写SQL语句
            string sql = string.Format(@"select BookID,BookName,Author,Press,BookType,Price 
                        from Books,Book,BookType where Books.ID = Book.ID 
                        and Book.BookTypeID = BookType.BookTypeID 
                        and Books.BookID={0} ", bookId);
            //执行SQL语句
            SqlDataReader reader = DBHelper.ExecuteReader(sql);
            return reader;
        }
    }
}
